[#ftl]
[#--include "../../util.ftl"/--]
[@define "agile.form.DateTimeTextBoxMixin" "agile.form.ValidationTextBox"]		
	attributes:agile.delegate(agile.form.ValidationTextBox.prototype.attributes,{
		conversion:{_ignore:true,_hidden:true}
		,pattern:{_ignore:true,_hidden:true}
		,trim: {_ignore:true,_hidden:true}
		,maxLength:{_ignore:true,_hidden:true}
		[#--,"constraints_strict": lang.mixin({},agile.BooleanMetadata, {
			label:"i18n_strict"
			,onValueChange:function(widget,name,value){					
				var dateValue = widget.delegate.get("value");
				widget.delegate.constraints.strict = value;		
				widget.delegate.reset1("value",dateValue);
				widget.metadata(this.metadataCategory+"."+name,value);
			}
		})
		,"constraints_locale":lang.mixin({},agile.ComboMetadata,{
			label:"i18n_locale"
			,onValueChange:function(widget,name,value){					
				var dateValue = widget.delegate.get("value");
				widget.delegate.constraints.locale = value;		
				widget.delegate.reset1("value",dateValue);
				widget.metadata(this.metadataCategory+"."+name,value);
			}
		})--]
		,"constraints.selector":lang.mixin({},agile.ComboMetadata, {
			label:"i18n_selector",options:agile.i18nMap(["datetime","date","time"],null,true)
			,onValueChange:function(widget,name,value){					
				var dateValue = widget.delegate.get("value");
				widget.delegate.constraints.selector = value;		
				widget.delegate.reset1("value",dateValue);
				widget.metadata(this.metadataCategory+"."+name,value);
			}
		})
	})	
//	,constructor: function(){	
//		this.metadata("parameters.value",null);	
//	}
	,init:function(){
		aspect.after(this.delegate,"openDropDown",lang.hitch(this,function(){								
			if(!domClass.contains(this.domNode,"agileSelected")){
				this.onSelected();	
			}			
			topic.publish("agile.widget.selected",this);
		}));
	}
[/@]
